package com.bigdata.iotdb;

import java.util.List;

/**
 * 宽表数据类
 */
public class FormData {

    public FormData() {
    }

    private List<String> Labels;

    private List<List<String>> data;

    public List<String> getLabels() {
        return Labels;
    }

    public void setLabels(List<String> labels) {
        Labels = labels;
    }

    public List<List<String>> getData() {
        return data;
    }

    public void setData(List<List<String>> data) {
        this.data = data;
    }

    @Override
    public String toString() {
        String str = "";
        for(int i=0;i<Labels.size();i++){
            str += (i < Labels.size()-1) ? Labels.get(i)+", " : Labels.get(i) + "\n";
        }
        for(List<String> list:data){
            for(int j = 0;j < list.size();j++){
                str += (j < list.size()-1) ? list.get(j)+", " : list.get(j) + "\n";
            }
        }
        return "\n" + str;
    }
}
